home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PsL Monthly 1993 December
/
PSL Monthly Shareware CD-ROM (December 1993).iso
/
prgmming
/
dos
/
c
/
bnce_ra.exe
/
VIDEO.H
< prev
next >
Wrap
C/C++ Source or Header
|
1989-03-17
|
2KB
|
57 lines
/* video.h - assorted video functions
Copyright (c) 1989 Ronald Abramson
*/
#include <dos.h>
#include <memory.h>
#define VIDEO_IO 0x10
#define SET_CRSR_POS 2
#define GET_CRSR_POS 3
#define SET_VID_PAGE 5
#define SET_VID_MODE 0
#define GET_VID_MODE 0xf
union REGS regs;
typedef struct {
unsigned VIDEO_SEG; /* base video buffer segment */
unsigned EQUIP_FLAG; /* BIOS Equipment List Flag */
char page; /* active video page */
char mode; /* video mode */
char crsr_row; /* cursor pos - row */
char crsr_col; /* cursor pos - col */
} vid_rec; /* struct for video config */
/* FUNCTION PROTOTYPES */
/* BIOS-level cursor functions */
void crsr_pos_hide( char page ); /* duck the cursor to line 26 */
void crsr_pos_restore( unsigned coords, char page );
unsigned crsr_pos_get( char page ); /* ret: upper 8 bits = row, lower 8 = col */
void crsr_pos_set( int y, int x, char page );
/* direct clear screen */
void cl_scr( vid_rec *v );
/* set/get video mode */
void set_vid_mode( char mode );
char get_vid_mode( void );
/* save/restore the screen to and from a 4000 byte char buffer */
void scr_save( vid_rec *v0, char *scr_buf );
void scr_restore( vid_rec *v0, char *scr_buf );
/* save and restore video page */
char get_vid_page( void );
void restore_v0_page( char page );
/* window funcs - save, restore, clear, clear w/ attrib, hilite, border */
void sav_wndw( int y0, int x0, int y1, int x1, char *temp_scr, vid_rec *v );
void rst_wndw( int y0, int x0, int y1, int x1, char *temp_scr, vid_rec *v );
void clr_wndw( int y0, int x0, int y1, int x1, vid_rec *v );
void clr_wndw_c( int y0, int x0, int y1, int x1, vid_rec *v, char attr );
void lit_wndw( int y0, int x0, int y1, int x1, vid_rec *v );
void bor_wndw( int y0, int x0, int y1, int x1, vid_rec *v );
/* EOF video.h */